/// materialTypeName : "生活用品"
/// materialTypeSubtypeName : "办公用品"
/// warehouse : null
/// org : "绍兴"
/// branchName : "杭州市第三社会福利院"
/// assetTypeName : "消耗品"
/// supplierName : "测试"
/// purchaseTypeName : null
/// statusName : null
/// total : 171
/// isChange : null
/// isUpgrade : null
/// orgPrice : null
/// materialName : "圆珠笔"
/// materialType : 18
/// materialTypeSubtype : 56
/// assetType : 3
/// purchaseType : "2"
/// warehouseId : null
/// brand : "晨光"
/// maintainer : 3
/// model : "szdxcfgvbhjn2223"
/// specification : ""
/// attatchId : null
/// path : ""
/// unit : "支"
/// price : 3
/// supplierId : 2
/// orgId : 6507
/// status : 1
/// remark : ""
/// autoOutbound : 0
/// branchId : 6627
/// tenantId : 1000
/// saasId : 1000
/// accCode : "1000.6507.6627"
/// materialNo : "18-56-0001"
/// id : 628
/// createdBy : "5"
/// createdDate : "2022-03-21 15:14:24"
/// updatedBy : "5"
/// updatedDate : "2022-03-21 15:21:49"

class GoodsRequestListData {
  GoodsRequestListData(
      {this.materialTypeName,
      this.materialTypeSubtypeName,
      this.warehouse,
      this.org,
      this.branchName,
      this.assetTypeName,
      this.supplierName,
      this.purchaseTypeName,
      this.statusName,
      this.total,
      this.isChange,
      this.isUpgrade,
      this.orgPrice,
      this.materialName,
      this.materialType,
      this.materialTypeSubtype,
      this.assetType,
      this.purchaseType,
      this.warehouseId,
      this.brand,
      this.maintainer,
      this.model,
      this.specification,
      this.attatchId,
      this.path,
      this.unit,
      this.price,
      this.supplierId,
      this.orgId,
      this.status,
      this.remark,
      this.autoOutbound,
      this.branchId,
      this.tenantId,
      this.saasId,
      this.accCode,
      this.materialNo,
      this.id,
      this.createdBy,
      this.createdDate,
      this.updatedBy,
      this.updatedDate,this.officeId});

  GoodsRequestListData.fromJson(dynamic json) {
    materialTypeName = json['materialTypeName'];
    materialTypeSubtypeName = json['materialTypeSubtypeName'];
    warehouse = json['warehouse'];
    org = json['org'];
    branchName = json['branchName'];
    assetTypeName = json['assetTypeName'];
    supplierName = json['supplierName'];
    purchaseTypeName = json['purchaseTypeName'];
    statusName = json['statusName'];
    total = json['total'];
    isChange = json['isChange'];
    isUpgrade = json['isUpgrade'];
    orgPrice = json['orgPrice'];
    materialName = json['materialName'];
    materialType = json['materialType'];
    materialTypeSubtype = json['materialTypeSubtype'];
    assetType = json['assetType'];
    purchaseType = json['purchaseType'];
    warehouseId = json['warehouseId'];
    brand = json['brand'];
    maintainer = json['maintainer'];
    model = json['model'];
    specification = json['specification'];
    attatchId = json['attatchId'];
    path = json['path'];
    unit = json['unit'];
    price = json['price'];
    supplierId = json['supplierId'];
    orgId = json['orgId'];
    status = json['status'];
    remark = json['remark'];
    autoOutbound = json['autoOutbound'];
    branchId = json['branchId'];
    tenantId = json['tenantId'];
    saasId = json['saasId'];
    accCode = json['accCode'];
    materialNo = json['materialNo'];
    id = json['id'];
    createdBy = json['createdBy'];
    createdDate = json['createdDate'];
    updatedBy = json['updatedBy'];
    updatedDate = json['updatedDate'];
    officeId = json['officeId'];
    var dynamicber = json['quantity'];
    if(dynamicber!=null){
      selectNumber = dynamicber??0;
    }
  }

  String? materialTypeName;
  String? materialTypeSubtypeName;
  dynamic warehouse;
  String? org;
  String? branchName;
  String? assetTypeName;
  String? supplierName;
  dynamic purchaseTypeName;
  dynamic statusName;
  dynamic total;
  dynamic isChange;
  dynamic isUpgrade;
  dynamic orgPrice;
  String? materialName;
  dynamic materialType;
  dynamic materialTypeSubtype;
  dynamic assetType;
  String? purchaseType;
  dynamic warehouseId;
  String? brand;
  dynamic maintainer;
  String? model;
  String? specification;
  dynamic attatchId;
  String? path;
  String? unit;
  dynamic price;
  dynamic supplierId;
  dynamic orgId;
  dynamic status;
  String? remark;
  dynamic autoOutbound;
  dynamic branchId;
  dynamic tenantId;
  dynamic saasId;
  String? accCode;
  String? materialNo;
  dynamic id;
  String? createdBy;
  String? createdDate;
  String? updatedBy;
  String? updatedDate;
  num selectNumber = 0;
  dynamic officeId;

  String get quantity => selectNumber.toString();

  GoodsRequestListData copyWith({
    String? materialTypeName,
    String? materialTypeSubtypeName,
    dynamic warehouse,
    String? org,
    String? branchName,
    String? assetTypeName,
    String? supplierName,
    dynamic purchaseTypeName,
    dynamic statusName,
    dynamic total,
    dynamic isChange,
    dynamic isUpgrade,
    dynamic orgPrice,
    String? materialName,
    dynamic materialType,
    dynamic materialTypeSubtype,
    dynamic assetType,
    String? purchaseType,
    dynamic warehouseId,
    String? brand,
    dynamic maintainer,
    String? model,
    String? specification,
    dynamic attatchId,
    String? path,
    String? unit,
    dynamic price,
    dynamic supplierId,
    dynamic orgId,
    dynamic status,
    String? remark,
    dynamic autoOutbound,
    dynamic branchId,
    dynamic tenantId,
    dynamic saasId,
    String? accCode,
    String? materialNo,
    dynamic id,
    String? createdBy,
    String? createdDate,
    String? updatedBy,
    String? updatedDate,
  }) =>
      GoodsRequestListData(
          materialTypeName: materialTypeName ?? this.materialTypeName,
          materialTypeSubtypeName:
              materialTypeSubtypeName ?? this.materialTypeSubtypeName,
          warehouse: warehouse ?? this.warehouse,
          org: org ?? this.org,
          branchName: branchName ?? this.branchName,
          assetTypeName: assetTypeName ?? this.assetTypeName,
          supplierName: supplierName ?? this.supplierName,
          purchaseTypeName: purchaseTypeName ?? this.purchaseTypeName,
          statusName: statusName ?? this.statusName,
          total: total ?? this.total,
          isChange: isChange ?? this.isChange,
          isUpgrade: isUpgrade ?? this.isUpgrade,
          orgPrice: orgPrice ?? this.orgPrice,
          materialName: materialName ?? this.materialName,
          materialType: materialType ?? this.materialType,
          materialTypeSubtype: materialTypeSubtype ?? this.materialTypeSubtype,
          assetType: assetType ?? this.assetType,
          purchaseType: purchaseType ?? this.purchaseType,
          warehouseId: warehouseId ?? this.warehouseId,
          brand: brand ?? this.brand,
          maintainer: maintainer ?? this.maintainer,
          model: model ?? this.model,
          specification: specification ?? this.specification,
          attatchId: attatchId ?? this.attatchId,
          path: path ?? this.path,
          unit: unit ?? this.unit,
          price: price ?? this.price,
          supplierId: supplierId ?? this.supplierId,
          orgId: orgId ?? this.orgId,
          status: status ?? this.status,
          remark: remark ?? this.remark,
          autoOutbound: autoOutbound ?? this.autoOutbound,
          branchId: branchId ?? this.branchId,
          tenantId: tenantId ?? this.tenantId,
          saasId: saasId ?? this.saasId,
          accCode: accCode ?? this.accCode,
          materialNo: materialNo ?? this.materialNo,
          id: id ?? this.id,
          createdBy: createdBy ?? this.createdBy,
          createdDate: createdDate ?? this.createdDate,
          updatedBy: updatedBy ?? this.updatedBy,
          updatedDate: updatedDate ?? this.updatedDate,
       );

  Map<String, dynamic> toJson() {
    final map = <String, dynamic>{};
    map['materialTypeName'] = materialTypeName;
    map['materialTypeSubtypeName'] = materialTypeSubtypeName;
    map['warehouse'] = warehouse;
    map['org'] = org;
    map['branchName'] = branchName;
    map['assetTypeName'] = assetTypeName;
    map['supplierName'] = supplierName;
    map['purchaseTypeName'] = purchaseTypeName;
    map['statusName'] = statusName;
    map['total'] = total;
    map['isChange'] = isChange;
    map['isUpgrade'] = isUpgrade;
    map['orgPrice'] = orgPrice;
    map['materialName'] = materialName;
    map['materialType'] = materialType;
    map['materialTypeSubtype'] = materialTypeSubtype;
    map['assetType'] = assetType;
    map['purchaseType'] = purchaseType;
    map['warehouseId'] = warehouseId;
    map['brand'] = brand;
    map['maintainer'] = maintainer;
    map['model'] = model;
    map['specification'] = specification;
    map['attatchId'] = attatchId;
    map['path'] = path;
    map['unit'] = unit;
    map['price'] = price;
    map['supplierId'] = supplierId;
    map['orgId'] = orgId;
    map['status'] = status;
    map['remark'] = remark;
    map['autoOutbound'] = autoOutbound;
    map['branchId'] = branchId;
    map['tenantId'] = tenantId;
    map['saasId'] = saasId;
    map['accCode'] = accCode;
    map['materialNo'] = materialNo;
    map['id'] = id;
    map['createdBy'] = createdBy;
    map['createdDate'] = createdDate;
    map['updatedBy'] = updatedBy;
    map['updatedDate'] = updatedDate;
    map['officeId'] = officeId;
    return map;
  }

  @override
  bool operator ==(Object other) =>
      identical(this, other) ||
      other is GoodsRequestListData &&
          runtimeType == other.runtimeType &&
          id == other.id;

  @override
  int get hashCode => id.hashCode;
}
